label: Unref style_attrs list
authorTimm Bäder <mail@baedert.org>
Fri, 17 Apr 2020 15:08:04 +0000 (17:08 +0200)
committerTimm Bäder <mail@baedert.org>
Tue, 5 May 2020 06:20:09 +0000 (08:20 +0200)
gtk/gtklabel.c

index dda9b0d55896d3a94b46cc49efb4c0226ad1a293..c7ab789d6c870040325de517936812109432558b 100644 (file)
@@ -2852,7 +2852,10 @@ gtk_label_update_layout_attributes (GtkLabel      *self,
   PangoAttrList *attrs;
 
   if (self->layout == NULL)
-    return;
+    {
+      pango_attr_list_unref (style_attrs);
+      return;
+    }
 
   if (self->select_info && self->select_info->links)
     {
@@ -2913,8 +2916,7 @@ gtk_label_update_layout_attributes (GtkLabel      *self,
 
   pango_layout_set_attributes (self->layout, attrs);
 
-  if (attrs)
-    pango_attr_list_unref (attrs);
+  pango_attr_list_unref (attrs);
 }
 
 static void